<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <script src="http://cdn.static.runoob.com/libs/angular.js/1.4.6/angular.min.js"></script>
    <style>
        input.ng-invalid{
            background-color:lightblue;
        }
    </style>
</head>
<body>
<form ng-app="" name="myForm">
    输入你的名字：
    <input name="myAddress" ng-model="text" required>
</form>
</body>
</html>